Skip to content

feat(contract): removed panic error handling and added better error handling methods#184

Closed
AbuTuraab wants to merge 2 commits intorinafcode:mainfrom
AbuTuraab:main
Closed

feat(contract): removed panic error handling and added better error handling methods#184
AbuTuraab wants to merge 2 commits intorinafcode:mainfrom
AbuTuraab:main

Conversation

@AbuTuraab
Copy link
Copy Markdown

🚀 Pull Request

📋 Description

🔗 Related Issue(s)

🎯 Type of Change

This PR replaces all unwrap(), expect(), and panic! uses in production contract code with explicit error handling and new error enums where needed. It also updates contract entrypoints to return Result where appropriate and adds targeted error-path tests across TeachLink, documentation, credential registry, and identity registry. Disabled test files were cleaned of unwrap() usage to align with the no-panic rule.

@github-actions
Copy link
Copy Markdown

⚠️ PR Title Format

Please update your PR title to follow the conventional commit format:

type(scope): description

Types: feat, fix, docs, style, refactor, test, chore, perf, ci, build, revert

Examples:

  • feat(contract): add learning reward distribution
  • fix(escrow): resolve timeout calculation bug
  • docs: update contributing guidelines

See CONTRIBUTING.md for details.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 25, 2026

@AbuTuraab Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@github-actions
Copy link
Copy Markdown

🎉 Welcome to TeachLink, @AbuTuraab!

Thank you for your first contribution! A maintainer will review your PR soon.

While you wait:

  • Make sure all CI checks pass ✅
  • Review the PR checklist
  • Join our Discord to connect with the community

We appreciate your contribution to decentralized education! 🎓

@AbuTuraab AbuTuraab changed the title removed panic error handling and added better error handling methods feat(contract): removed panic error handling and added better error handling methods Mar 25, 2026
@AbuTuraab AbuTuraab closed this Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Excessive Use of Panic-Prone Functions

1 participant